<?php
/* @var $this MateriasController */
/* @var $model Materias */

$this->breadcrumbs=array(
	'Materias'=>array('index'),
	'Administrar',
);

// $this->menu=array(
// 	array('label'=>'Listar Materias', 'url'=>array('index')),
// 	array('label'=>'Crear Materias', 'url'=>array('create')),
// );

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#materias-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Administrar Materias</h1>



<?php //echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('bootstrap.widgets.TbGridView', array(
	'id'=>'materias-grid',
	'dataProvider'=>$model->search(),
	'type'=>'striped bordered condensed',
'template'=>"{items}\n{pager}",
	'columns'=>array(
		//'id_materia',
		'nombre',
		Interfaz::defaultGridViewButtons(),
	),
)); ?>
